/*
 *Copyright © 2015 zhaorongbao
 *招融宝
 *http://zhaorongbao.com
 *All rights reserved.
 */
package com.hanhai.common.result;

import org.apache.commons.lang3.StringUtils;

public class ValidateCodeSendResult extends BaseResult {

	public enum ResultCodeEnum {
		Parameters_error("参数错误"), System_exception("系统异常"), ExpiredOrNoExist(
				"效验码过期或者不存在"), Code_match_error("效验码不匹配"), ;

		private String desc;

		private ResultCodeEnum(String desc) {
			this.desc = desc;
		}

		public String getDesc() {
			return desc;
		}
		
		public static ResultCodeEnum getValueByName(String name){
			if(StringUtils.isBlank(name)){
				return null;
			}
			for(ResultCodeEnum codeEnum:ResultCodeEnum.values()){
				if(StringUtils.equals(name, codeEnum.name())){
					return codeEnum;
				}
			}
			return null;
		}

	}

}
